package Dao;

import Dto.UserDto;
import entity.User;

import java.sql.SQLException;

/**
 * @Author Su
 * @Date 2025/4/30 10:31
 * @Version 1.0 （版本号）
 */
public interface UserDAO {

    boolean insertUser(User user) throws SQLException;
    User getUserByUsername(String username) throws SQLException;
    User getUserByUserId(Integer userId) throws SQLException;
    User getUserByEmail(String email) throws SQLException;
    User findByUsername(String username) throws SQLException;
    void updateLastLoginTime(int userId) throws SQLException;
    boolean resetPassword(String email, String newPassword) throws SQLException;
    boolean isEmailRegistered(String email) throws SQLException;
    boolean updateUser(UserDto user) throws SQLException;
}
